<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $data['album_name'];?>_微图片</title>
<style>
*{margin:0;padding:0;}
html{overflow-y:scroll}
body {background:url(http://mat1.gtimg.com/www/mb/skin/jd/bhxp/bg.jpg) top center no-repeat fixed #E5E5E5;font-family:"微软雅黑";}
img{border:0;}
.header{height:35px;width:100%;border-bottom:1px solid #333;margin-top:0;top:0;left:0;z-index:100;filter:alpha(opacity=80);opacity:0.8;background:#2d2d2d;}
.header .nav_item{margin:0 auto;width:1010px;}
.header .nav_item ul{list-style:none;}
.header .nav_item li{float:left;}
.header .nav_item .nav_r li{float:right;}
.header .nav_item .nav_r li a{padding:5px 5px;height:25px;}
.header .nav_item a{color:#fff;font-size:14px;display:block;float:none; margin-top:1px;padding:8px 10px;line-height:17px;text-decoration:none;}
.header .nav_item a:hover,.nav .nav_item li:hover{color:#fff;background:#000;}
.header .nav_item .logo{width:120px;height:35px;background:url(http://app.qpic.cn/mblogpic/a9399f924c4e648304a2/2000) no-repeat;margin:0px 5px;padding:0;}
.header .nav_item .logo:hover{background:url(http://app.qpic.cn/mblogpic/a9399f924c4e648304a2/2000) no-repeat;}
.head_clear{height:0;width:100%;display:block;}
.main{width:1000px;margin:10px auto;overflow: hidden;}
.left{float:left;width:740px;height:100%;background-color:#fff;margin-bottom:-3000px; padding-bottom:3000px;}
.right{float:right;width:259px;height:100%;background:#e3eff3;border-left:1px dotted #A0BBC9;margin-bottom:-3000px; padding-bottom:3000px;}
.piclist{width:740px;text-align:center;margin-bottom:20px;}
.piclist li{float:left;width:164px;height:124px;list-style:none;background-color:#F8F8FA;border:#ccc 1px solid;margin:5px;background-image:url(http://app.qpic.cn/mblogpic/4133338b5c8cc4070bae/2000);background-repeat:no-repeat;background-position:66px;min-height:124px;}
.piclist li img{margin-top:2px;}
.footer{margin:15px;text-align:center;color:#333;font-size:12px;}
.footer a{color:#fff;text-decoration:none}
.twolayer{width:100%;height:2000px;_height:2000px;background:url(http://app.qpic.cn/mblogpic/385fbabecde5e338de9e/2000);position:absolute;top:0;left:0;filter:alpha(opacity=100);opacity:1;}
.forwardingBo{padding:4px;width:329px;height:152px;background:url(http://app.qpic.cn/mblogpic/db59ae75ce753b5ff38a/2000);}
.transmitBo{border:1px #AAA solid;width:327px;height:150px;background:#FFF;}
.transmTop{height:27px;line-height:27px;padding:0 10px;background:#EDF2F6;text-align:left;}
.ifrmatter{width:290px;margin:22px auto;}
.ifrmatter p{text-indent:2em;}
.ifrmatter p a{color:#0089D6;}
.ifhand{width:252px;margin:25px auto 0;}
.ifhand span{display:block;width:104px;height:27px;float:left;margin:0 11px;display:inline;}
</style>
</head>
<body>
<div class="header">
	<div class="nav_item">
		<ul>
			<li><a class="logo" href="/index.html" title="微图片">&nbsp;</a></li>
		</ul>
		<ul class="nav_r" id="info">
			<li id="qqLoginBtn"></li>
		</ul>
	</div>
</div>
<div class="head_clear"></div>
<div class="main">
	<div class="left">
        <?php
        if ($data['album_level'])
        {
            $weibo_num  = count(explode(',', $data['album_weibo']));
            $margin_top = array(1 => -175, 2 => -175, 3 => -300, 4 => -300);
        ?>
        <div class="twolayer" id="popup_box" style="display:none;">
            <div class="forwardingBo" id="attentionSina" style="margin-top: 155px; margin-right: auto; margin-bottom: 0px; margin-left: auto; display: block; ">
                <div class="transmitBo">
                      <div class="transmTop">
                        提示
                         <div style="float:right;padding-top:8px;">
                         <a href="javascript:void(0);" onclick="popup_hide();return false;"><img src="http://app.qpic.cn/mblogpic/0f4620fcd1cc531f09d8/2000"></a>
                         </div>
                      </div>
                      <div class="ifrmatter">
                            <div align="center"><p>一键关注，即可查看TA的相册！</p></div>
                            <div class="ifhand" style="width:260px;">
                                <span id="follow" onmouseover="timer_start();" style="overflow:hidden;padding-left:70px;width:112px;height:38px;background-image:url('');background-color:#fff;">
                                <iframe width="320px;" height="800px;" frameborder="0" scrolling="no" style="margin-top:<?php echo $margin_top[$weibo_num];?>px; margin-right: 0px; margin-bottom: 0px; margin-left: -108px; " src="http://widget.weibo.com/relationship/bulkfollow.php?language=zh_cn&uids=<?php echo $data['album_weibo'];?>&wide=1&color=C2D9F2,FFFFFF,0082CB,666666&amp;showtitle=1&showinfo=1&sense=0&verified=1&count=4&dpc=1"></iframe>
                                </span>
                                <div class="clear"></div>
                            </div>
                      </div>
                </div>
             </div>
        </div>
        <script type="text/javascript">
        var a = '<?php echo $data['album_id'] . $this->album->md5($data['album_weibo'], 16);?>';
        function cookie(a, b, c, e)
        {
            if (b == undefined) {
                a = a + "=";
                b = document.cookie.split(";");
                for (c = 0; c < b.length; c++) {
                    for (e = b[c]; e.charAt(0) == " ";) e = e.substring(1, e.length);
                    if (e.indexOf(a) == 0) return decodeURIComponent(e.substring(a.length, e.length));
                }
                return null;
            } else {
                var f = "";
                if (c) {
                    f = new Date;
                    f.setTime(f.getTime() + c * 24 * 60 * 60 * 1E3);
                    f = "; expires=" + f.toGMTString();
                }
                document.cookie = a + "=" + encodeURIComponent(b) + f + "; path=/" + (e ? ";domain=" + e: "");
            }
        }

        function popup_show()
        {
            document.getElementById("popup_box").style.display = "block";

        }

        var visite = cookie(a);
        if (visite == null)
        {
            popup_show();
        }

        function popup_hide()
        {
            if (visite == null)
            {
                if (confirm('您确定要离开本相册？'))
                {
                    location.href = '<?php echo $this->config->item('base_url');?>';
                }
            }
            else
            {
                document.getElementById("popup_box").style.display = "none";
            }
        }

        var t = null;
        function timer_start()
        {
            if (t == null)
            {
                t = setTimeout(function() {
                    
                    visite = 'yes';
                    popup_hide();
                    cookie(a, visite, 1);

                }, 8 * 1000);
            }
        }
        </script>
        <?php
        }
        ?>
		<div style="height:25px;background:#e3eff3;padding:5px;">
			<span style="font-size:12px;color:#888;float:right;margin:5px 5px 0 5px;">共有<?php echo $total;?>张图片</span>
			<p style="float:left;margin:0 5px 0 5px;"><?php echo $data['album_name'];?></p>
		</div>
		<ul class="piclist">
        <?php
        foreach ($picture as $key => $rows)
        {
            $thumb = $this->album->get_image_src('thumb', $data['album_id'], $rows['img']);
            $style = ($key % 4) ? '' : 'style="margin-left:20px"';
            echo '<li ' . $style . '><a href="' . $rows['html'] . '"><img src="' . $thumb . '" width="160" height="120" /></a></li>';
        }
        ?>
		</ul>
	</div>
	<div class="right">
		<div style="height:200px;text-align:center;background:#fff;">
		<iframe width="150" height="200" frameborder="0" scrolling="no" src="http://widget.weibo.com/relationship/bulkfollow.php?language=zh_cn&uids=<?php echo $first;?>&wide=1&color=FFFFFF,FFFFFF,0082CB,666666&showtitle=1&showinfo=0&sense=0&verified=0&count=1&refer=<?php echo urlencode($url);?>&dpc=1"></iframe>
        </div>
		<div id="google" style="height:250px;text-align:center;margin-top:5px;">
		<script type="text/javascript">
		google_ad_client = "ca-pub-8851101767970871";
		google_ad_slot = "6486381932";
		google_ad_width = 250;
		google_ad_height = 250;
		</script>
		<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
		</div>
	</div>
</div>
<div class="footer"><a href="http://www.aliyun.com/" target="_blank">Power by aliyun.com</a></div>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F71001c4401a5ff5ebbf0bc406ef706de' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>